package com.cimr.comm.po;

import com.cimr.comm.base.BaseEntity;
import net.sf.json.JSONObject;

import java.io.Serializable;
import java.util.Date;

public class User extends BaseEntity {
    //0:禁止登录
    public static final int _0 = new Integer(0);
    //1:有效
    public static final int _1 = new Integer(1);

    private String id;
    private String username;
    private transient String pswd;
    private int status;
    private String fullname;
    private String phone;
    private String email;
    private String comment;
    private Date lastLoginTime;
    private Float orderId;
    private String theme;
    private String avatar;
    private String groupId;
    private String groupName;
    private String userType;


    public User(User user) {
        this.id = user.getId();
        this.username = user.getUsername();
        this.pswd = user.getPswd();
        this.status = user.getStatus();
        this.fullname = user.getFullname();
        this.phone = user.getPhone();
        this.email = user.getEmail();
        this.comment = user.getComment();
        this.lastLoginTime = user.getLastLoginTime();
        this.orderId = user.getOrderId();
        this.theme = user.getTheme();
        this.avatar = user.getAvatar();
        this.groupId = user.getGroupId();
        this.userType = user.getUserType();
    }

    public User() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPswd() {
        return pswd;
    }

    public void setPswd(String pswd) {
        this.pswd = pswd;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }


    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Float getOrderId() {
        return orderId;
    }

    public void setOrderId(Float orderId) {
        this.orderId = orderId;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getFullname() {
        return fullname;
    }

    public void setFullname(String fullname) {
        this.fullname = fullname;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

//    public String toString() {
//        return ToStringBuilder.reflectionToString(this);
//    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String toString(){
        return JSONObject.fromObject(this).toString();
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }
}
